setwd("") #Set working directory

# Read packages
library(haven)
library(list)

# Read data
list <- read_dta("H:/Ph.d/Projektet/Studier/Listeeksperiment/Data og endeligt skema/List_data_final.dta")
list <- as.data.frame(list)

# Table D.2: Population proportions of ceiling and floor liars using Quasi-Bayesian approximation (QBA) and maximum likelihood (ML) estimators
liars <- ictreg(no_items ~ 1, J = 4, data=list
                , method = "ml", fit.start = "glm", floor = TRUE, ceiling = TRUE,  
                floor.fit= "bayesglm", ceiling.fit = "bayesglm", 
                floor.formula = ~ 1, ceiling.formula = ~ 1)

summary(liars, boundary.proportions = TRUE) # QBA: ceiling liars=0.000; floor liars=0.027. ML: ceiling liars=0.000; floor liars=0.026 
